﻿using System;
using System.Linq;

namespace IInject
{
    internal static class TypeExtensions
    {
        public static bool IsPublicClass(this Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            return type.IsPublic && !type.IsInterface && !type.IsEnum && !type.IsAbstract;
        }
    }
}
